<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateMenuTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('menu', function (Blueprint $table) {

            $table->increments('id');
            $table->string('name',255)->default('')->comment('名称');
            $table->string('path',255)->default('')->comment('标识');
            $table->integer('pid')->default(0)->comment('父id');
            $table->timestamp('add_time')->default(DB::raw('CURRENT_TIMESTAMP'))->comment('添加时间');
            $table->engine = 'InnoDB';
            $table->charset = 'utf8';
            $table->collation = 'utf8_unicode_ci';

        });

    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
//        Schema::table('user', function (Blueprint $table) {
//            //
//        });
    }
}
